From 463f4e1242a232a609c732773900a01d1bb7a62e Mon Sep 17 00:00:00 2001 From: Dave Love Date: Wed, 8 Nov 2000 21:04:28 +0000 Subject: [PATCH] 2000-11-09 Lars Magne Ingebrigtsen * nnweb.el (nnweb-decode-entities): Work for non-character entities. 2000-10-08 10:59:13 ShengHuo ZHU * nnweb.el (nnweb-url-retrieve-asynch): url-retrieve is asynchronous in Exp version. --- lisp/gnus/nnweb.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index 54ed5a56fc8..c4ff7248e6b 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -350,9 +350,13 @@ and `altavista'.") (setq url-current-callback-data data url-be-asynchronous t url-current-callback-func callback) - (url-retrieve url)) + (url-retrieve url nil)) (setq-default url-be-asynchronous old-asynch))) +(if (fboundp 'url-retrieve-synchronously) + (defun nnweb-url-retrieve-asynch (url callback &rest data) + (url-retrieve url callback data))) + ;;; ;;; DejaNews functions. ;;; @@ -723,16 +727,17 @@ and `altavista'.") "Decode all HTML entities." (goto-char (point-min)) (while (re-search-forward "&\\(#[0-9]+\\|[a-z]+\\);" nil t) - (replace-match (char-to-string - (if (eq (aref (match-string 1) 0) ?\#) + (let ((elem (if (eq (aref (match-string 1) 0) ?\#) (let ((c (string-to-number (substring (match-string 1) 1)))) (if (mm-char-or-char-int-p c) c 32)) (or (cdr (assq (intern (match-string 1)) w3-html-entities)) - ?#))) - t t))) + ?#)))) + (unless (stringp elem) + (setq elem (char-to-string elem))) + (replace-match elem t t)))) (defun nnweb-decode-entities-string (str) (with-temp-buffer -- 2.30.2